insert element at the end of linked list